class Animal:
    def eat(self):
        print("吃---")

    def drink(self):
        print("喝---")

    def run(self):
        print("跑---")

    def sleep(self):
        print("睡---")


class Dog(Animal):
    def bark(self):
        print("汪汪汪")


class Cat(Animal):
    def catch(self):
        print("抓老鼠")


class XiaoTianQuan(Dog):
    def fly(self):
        print("我会飞")

    def bark(self):
        print("我会不一样の叫")  # 重写
        super().bark()  # 调用父类的方法（父类的匿名对象）


if __name__ == '__main__':
    wang_cai = Dog()
    wang_cai.eat()
    wang_cai.bark()
    miao = Cat()
    miao.catch()
    xiao_tian_quan = XiaoTianQuan()
    # xiao_tian_quan.catch()  #继承Dog，与Cat无关
    xiao_tian_quan.fly()
    xiao_tian_quan.bark()
